package com.github.icloudpay.pay.core.entity;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;


/**
 * 支付通道信息表
 * 
 * @author hexufeng
 * @date 2018-06-05 14:17:16
 */
@Table(name = "pay_channel")
public class PayChannel implements Serializable {
	private static final long serialVersionUID = 1L;

	//
	@Id
	private Long id;

	// 支付通道编号
	@Column(name = "pay_channel_no")
	private String payChannelNo;

	// 支付通道名称
	@Column(name = "pay_channel_name")
	private String payChannelName;

	//支付公司编号
	@Column(name = "pay_company_no")
	private String payCompanyNo;

	// 通道费率
	@Column(name = "fee_ratio")
	private BigDecimal feeRatio;

	//状态 0启用 1停用
	@Column(name = "status")
	private String status;

	//业务类型 1支付 2代付
	@Column(name = "business_type")
	private String businessType;
	
	@Transient
	private String feeRatioStr;

	/**
	 * 设置：
	 */
	public void setId(Long id) {
		this.id = id;
	}
	/**
	 * 获取：
	 */
	public Long getId() {
		return id;
	}
	/**
	 * 设置： 支付通道编号
	 */
	public void setPayChannelNo(String payChannelNo) {
		this.payChannelNo = payChannelNo;
	}
	/**
	 * 获取： 支付通道编号
	 */
	public String getPayChannelNo() {
		return payChannelNo;
	}
	/**
	 * 设置： 支付通道名称
	 */
	public void setPayChannelName(String payChannelName) {
		this.payChannelName = payChannelName;
	}
	/**
	 * 获取： 支付通道名称
	 */
	public String getPayChannelName() {
		return payChannelName;
	}
	/**
	 * 设置：支付公司编号
	 */
	public void setPayCompanyNo(String payCompanyNo) {
		this.payCompanyNo = payCompanyNo;
	}
	/**
	 * 获取：支付公司编号
	 */
	public String getPayCompanyNo() {
		return payCompanyNo;
	}
	/**
	 * 设置： 通道费率
	 */
	public void setFeeRatio(BigDecimal feeRatio) {
		this.feeRatio = feeRatio;
	}
	/**
	 * 获取： 通道费率
	 */
	public BigDecimal getFeeRatio() {
		return feeRatio;
	}
	/**
	 * 设置：状态 0启用 1停用
	 */
	public void setStatus(String status) {
		this.status = status;
	}
	/**
	 * 获取：状态 0启用 1停用
	 */
	public String getStatus() {
		return status;
	}
	public String getBusinessType() {
		return businessType;
	}
	public void setBusinessType(String businessType) {
		this.businessType = businessType;
	}
	public String getFeeRatioStr() {
		feeRatioStr = getFeeRatio().toString();
		return feeRatioStr;
	}
	public void setFeeRatioStr(String feeRatioStr) {
		this.feeRatioStr = feeRatioStr;
	}
	@Override
	public String toString() {
		return "PayChannel [id=" + id + ", payChannelNo=" + payChannelNo + ", payChannelName=" + payChannelName
				+ ", payCompanyNo=" + payCompanyNo + ", feeRatio=" + feeRatio + ", status=" + status + ", businessType="
				+ businessType + ", feeRatioStr=" + feeRatioStr + "]";
	}
	
}
